//
//  NewestSecData.m
//  FLLGodOfCooking
//
//  Created by LL.F on 16/09/07
//  Copyright (c) __ORGANIZATIONNAME__. All rights reserved.
//

#import "NewestSecData.h"
#import "NewestTopics.h"

@implementation NewestSecData

+ (NSDictionary *)objectClassInArray{
    return @{@"topics" : [NewestTopics class]};
}
- (void)setValue:(id)value forKey:(NSString *)key
{
    
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"topics"]) {
        NSMutableArray<NewestTopics *>  *topicsArray = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            NewestTopics *data = [NewestTopics modelWithDic:dic];
            [topicsArray addObject:data];
        }
        _topics = topicsArray;
    }
}
- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
    if ([key isEqualToString:@"id"]) {
        _id_Data = value;
    } if ([key isEqualToString:@"description"]) {
        _description_Data = value;
    }
}
@end
